import axios from '../utils/http'

export const cartList  =  (uid) => axios.get("cartlist?uid="+uid);

export const toSwiftArr = (arrList)=>{

     let cartarr = [];
    arrList.forEach(element => {
        if(element.content)
        {
           element.content.forEach(item=>{
               if(item)
               {
                 let checked = false
                 item.checked = checked
                 cartarr.push(item)
               }
           })
        }
    });

    return cartarr
}